@extends('admin.container')

@section('c-head')
    <script type="text/javascript">
        var PAGE_DATA = {
            REST_API : {
                update_logistics : "update_logistics", // 处理 / 回复.
                get_logistics_list : "{{route('admin.logistics.enquiry.index')}}", // 获取物流(logistics)询价(inquiry)数据,搜索
            },
            state_data : [
                {code:'1', text: '已处理'},
                {code:'2', text: '未处理'},
            ]
        };
    </script>
@stop

@section('c-body')
    <div class="comm-title">
                    <span class="title-msg">
                        物流询价管理
                    </span>
    </div>
    <div class="comm-body">
        <div class="tool-bar-top clearfix" style="padding-top:25px;">

            <div style=" width:850px;float: left;">
                <div class="input-unit">
                                <span class="key-txt">
                                    公司名称：
                                </span>
                    <input class="val-input" id="company" />
                </div>
                <div class="input-unit">
                                <span class="key-txt">
                                    联系电话：
                                </span>
                    <input class="val-input" id="contact-tel" />
                </div>

                <div class="input-unit">
                                <span class="key-txt">
                                    状态：
                                </span>
                    <select id="state" style="width:200px; height:30px;">
                        <option value="">请选择 </option>
                        <option value="111">1111 </option>
                    </select>
                </div>
            </div>
            <button id="search-btn" type="button" class="am-btn am-btn-success am-btn-xs"
                    style="float:left;">
                搜索
            </button>
        </div>
        <table class="am-table am-table-striped am-table-hover am-table-centered admin-comm-tbl"
               style="">
            <thead>
            <tr>
                <th>
                    公司名称
                </th>
                <th>
                    装车点
                </th>
                <th>
                    卸货点
                </th>
                <th>
                    货物
                </th>
                <th> 数量 </th>
                <th> 联系电话 </th>
                <th> 状态 </th>


                <th style="width:15%">
                    操作
                </th>
            </tr>
            </thead>
            <tbody id="logistics-context">

            </tbody>
        </table>


        <div id="comm-paging" class="admin-paging"> </div>

    </div>
    <script type="text/template" id="tbl-list-templ">
        <% _.each(obj, function(item){  %>
        <tr>
            <td style="width: 230px; max-width: 230px;">
                <%=item.company %>
            </td>
            <td style="width: 170px; max-width: 170px;">
                <%=item.load_point %>
            </td>
            <td style="width: 105px; max-width: 105px;">
                <%=item.unload_point %>
            </td>
            <td style="width: 85px; max-width: 85px;">
                <%=item.goods_name %>
            </td>
            <td style="width: 75px; max-width: 75px;">
                <%=item.amount %>
            </td>
            <td style="width: 145px; max-width: 145px;">
                <%=item.tel %>
            </td>
            <td>
                <%=item.state %>
            </td>
            <td>
                <div class="operate-btns-2 clearfix">
                    <% if(item.operate == "1") { %>

                    <button type="button" class="am-btn am-btn-primary am-btn-xs"
                            style="float:left; visibility:hidden;">处理 </button>
                    <% } else { %>

                    <button type="button" class="am-btn am-btn-primary am-btn-xs sel-reply-btn"
                            style="float:left;" href='<%=item.reply_url%>'>处理 </button>
                    <% } %>

                    <a class="am-btn am-btn-default am-btn-xs sel-detail-btn"
                       style="float:left; margin-left: 9px;"
                       href='<%=item.detail_url%>' >
                        查看
                    </a>
                </div>
            </td>
        </tr>
        <% }); %>
    </script>

    <script type="text/template" id="reply-templ">
        <div class="reply-dialog">
            <textarea></textarea>
            <div class="btns-line">
                <button type="button" class="sel-edit-btn am-btn am-btn-primary am-btn-sm"
                        style="float:left;">
                    <div style="width:56px;">
                        确认修改
                    </div>
                </button>
                <button type="button" class="sel-cancel-btn am-btn am-btn-default am-btn-sm"
                        style="float:left; margin-left:35px;">
                    <div style="width:56px;">
                        取消
                    </div>
                </button>
            </div>
        </div>
    </script>

    <script src="/assets/b2b/admin/js/libs/jquery.paging.min.js">
    </script>
    <script src="/assets/b2b/admin/js/libs/dialog-min.js">
    </script>
    <script src="/assets/b2b/admin/js/libs/underscore-min.js">
    </script>
    <script src="/assets/b2b/admin/js/libs/jquery-ui.min.js">
    </script>

    <script src="/assets/b2b/admin/js/pages/27.js"></script>

@stop